home *** CD-ROM | disk | FTP | other *** search
- docTitle = "nothing yet"
- titleWidth = 0;
- titleHeight = 40;
- titleAlign = "topright";
-
- //geniale Netscape vs. IE-Unterscheidung!
- var n = (document.layers)?1:0;
- var ie = (document.all)?1:0;
-
- function startIt(docTitle2,titleWidth2)
- {
- docTitle=docTitle2;
- titleWidth = titleWidth2;
- if (n || ie)
- {
- createLayer("watermark",null,0,0,titleWidth,titleHeight,"<font face='Verdana,Tahoma,sans-serif'><p align='right'><div align='right'><h1>"+docTitle+"</font></h1></div></p>",'#000000');
- mark = new dynLayer("watermark");
- setInterval("wtrmark()",130);
- }
- }
-
- function dynLayer(id,nestref)
- {
- if (n) {this.css = document.layers[id];}
- else if (ie) {this.css = document.all[id].style;}
- this.moveBy = dynLayerMoveBy;
- this.moveTo = dynLayerMoveTo;
- }
-
- function dynLayerMoveBy(x,y)
- {
- this.x += x;
- this.css.left = this.x;
- this.y += y;
- this.css.top = this.y;
- }
-
- function dynLayerMoveTo(x,y)
- {
- this.x = x;
- this.css.left = this.x;
- this.y = y;
- this.css.top = this.y;
- }
- function wtrmark()
- {
- if (n)
- {
- windowWidth = window.innerWidth-17;
- windowHeight = window.innerHeight-17
-
-
-
- if (titleAlign == "topleft") mark.moveTo(window.pageXOffset,window.pageYOffset)
- if (titleAlign == "topright") mark.moveTo(windowWidth-titleWidth+window.pageXOffset,window.pageYOffset);
- if (titleAlign == "bottomleft") mark.moveTo(window.pageXOffset,windowHeight-titleHeight+window.pageYOffset)
- if (titleAlign == "bottomright")mark.moveTo(windowWidth-titleWidth+window.pageXOffset,windowHeight-titleHeight+window.pageYOffset)
- }
- else
- if (ie)
- {
- windowWidth = document.body.clientWidth
- windowHeight = document.body.clientHeight
- if (titleAlign == "topleft") mark.moveTo(document.body.scrollLeft,document.body.scrollTop)
- if (titleAlign == "topright") mark.moveTo(windowWidth-titleWidth+document.body.scrollLeft,document.body.scrollTop)
- if (titleAlign == "bottomleft") mark.moveTo(document.body.scrollLeft,windowHeight-titleHeight+document.body.scrollTop)
- if (titleAlign == "bottomright")mark.moveTo(windowWidth-titleWidth+window.pageXOffset,windowHeight-titleHeight+document.body.scrollTop)
- }
- }
-
- function createLayer(id,nestref,left,top,width,height,content,bgColor,visibility,zIndex)
- {
- if (n)
- {
- if (nestref)
- {var lyr = eval("document."+nestref+".document."+id+" = new Layer(width, document."+nestref+")")}
- else
- {
- var lyr = document.layers[id] = new Layer(width);
- eval("document."+id+" = lyr");
- }
- lyr.name = id;
- lyr.left = window.innerWidth - width;
- lyr.top = top;
- if (height!=null) lyr.clip.height = height;
- if (bgColor!=null) lyr.bgColor = bgColor;
- lyr.visibility = (visibility=='hidden')? 'hide' : 'show';
- if (zIndex!=null) lyr.zIndex = zIndex;
- if (content)
- {
- lyr.document.open();
- lyr.document.write(content);
- lyr.document.close();
- }
- }
- else if (ie)
- {
- var str = '\n<DIV id='+id+' style="position:absolute; left:'+left+'; top:'+top+'; width:'+width;
- if (height!=null)
- {
- str += '; height:'+height;
- str += '; clip:rect(0,'+width+','+height+',0)';
- }
- if (bgColor!=null) str += '; background-color:'+bgColor
- if (zIndex!=null) str += '; z-index:'+zIndex
- if (visibility) str += '; visibility:'+visibility
- str += ';">'+((content)?content:'')+'</DIV>'
- if (nestref)
- {
- index = nestref.lastIndexOf(".")
- var nestlyr = (index != -1)? nestref.substr(index+1) : nestref
- document.all[nestlyr].insertAdjacentHTML("BeforeEnd",str);
- }
- else {document.body.insertAdjacentHTML("BeforeEnd",str)}
- }
- }
-